package yygh.hosp.Repository;

import yygh.hospital.model.hosp.Hospital;

import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface HospitalRepository extends MongoRepository<Hospital,String> {


    //由于HospitalRepository继承了MongoRepository，MongoRepository会根据自身的规范进行自动查询，无需我们进行业务逻辑的编写
    Hospital getHospitalByHoscode(String hoscode);

    List<Hospital> getHospitalByHosnameLike(String hosname);
}
